//
//  OrderTableViewCell.m
//  BusinessApp
//
//  Created by CccDaxIN on 2016/10/19.
//  Copyright © 2016年 macox. All rights reserved.
//

#import "OrderTableViewCell.h"

@implementation OrderTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setModel:(OrderDetailsModel *)model{
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        NSString *imageStr = [NSString stringWithFormat:@"%@%@",ReleaseORDebug,model.ImagePath];
        NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:imageStr]];
        dispatch_async(dispatch_get_main_queue(), ^{
            _commodityImage.image = [UIImage imageWithData:data];
        });
    });
    
    //                NSString *imageStr = [NSString stringWithFormat:@"%@%@",ReleaseORDebug,model.ImagePath];
    //                NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:imageStr]];
    //                orderCell.commodityImage.image = [UIImage imageWithData:data];
    _commodityTitle.text = model.ProductName;
    _commodityClass.text = model.categoryNames;
    NSString *stringPrice = [NSString stringWithFormat:@"%.2f",model.ProductPrice];
    _commodityPrice.text = stringPrice;
    NSString *string_number = [NSString stringWithFormat:@"%d",model.Quantity];
    _commodityNumber.text = string_number;
    
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
